PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


GetThemeMenuItemExtra

Obtains a measurement of the space surrounding a menu item.

pascal OSStatus GetThemeMenuItemExtra (
                     ThemeMenuItemType inItemType,
                     SInt16 *outHeight,
                     SInt16 *outWidth);
inItemType
A value of type ThemeMenuItemType . Pass a constant identifying the type of menu item for which you are interested in getting a measurement. See Theme Menu Item Type Constants .
outHeight
A pointer to a signed 16-bit integer. On return, the integer value represents the total amount of padding between the content of the menu item and the top and bottom of its frame (in pixels). Your content's height plus the measurement provided by the outHeight parameter equals the total item height.
outWidth
A pointer to a signed 16-bit integer. On return, the integer value represents the total amount of padding between the content of the menu item and the left and right limits of the menu (in pixels). Your content's width plus the measurement provided by the outWidth parameter equals the total item width.
function result
A result code; see Result Codes .
DISCUSSION

Your application should call the GetThemeMenuItemExtra function when you are writing your own menu definition function and wish to be theme-compliant. Once you have determined the height and width of the content of a menu item, call GetThemeMenuItemExtra to get a measurement in pixels of the space surrounding a menu item, including any necessary inter-item spacing, in the current theme. By combining the values for your menu item's content and the extra padding needed by the theme, you can derive the size of the rectangle needed to encompass both the content and the theme element together.

VERSION NOTES

Available with Appearance Manager 1.0.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)